import request from '@/utils/request'

// 获取数据备份列表
export function getBackupListData(params) {
  return request({
    url: '/manage/backup/list',
    method: 'get',
    params
  })
}

// 数据备份
export function backupSysData(params) {
  return request({
    url: '/manage/backup/backupDataBase',
    method: 'get',
    params
  })
}
// 删除数据库备份记录
export function delBackup(ids) {
  return request({
    url: `/manage/backup/${ids}`,
    method: 'delete',
  })
}
// 导出数据库备份记录列表
export function exportBackupList(params) {
  return request({
    url: '/manage/backup/export',
    method: 'post',
    params
  })
}
// 还原数据
export function restoreData(id) {
  return request({
    url: `/manage/backup/restoreDataBase/${id}`,
    method: 'get',
  })
}